
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../../../global/css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../../../global/css/swiper.min.css" />
    <link rel="stylesheet" type="text/css" href="./frm.css" />
</head>
<body>
    <div class="aui-content">
        <ul id="title-block" class="aui-list aui-form-list aui-margin-b-5">
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-input with-clear-btn">
                        <input id="subject" type="text" placeholder="请输入标题（建议5~30个字）">
                    </div>
                </div>
            </li>
		</ul>

		<div id="cont-blocks"></div>

        <!-- <div class="aui-btn aui-btn-primary aui-pull-right" tapmode onclick="addContBlock();">添加图文</div> -->
	</div>
</body>

<script id="tpl-cont-block" type="text/x-dot-template">
    <ul class="aui-list aui-form-list">
	    <i class="aui-iconfont aui-icon-close del-cont-block" tapmode onclick="closeContBlock(this);"></i>
        <li class="aui-list-item">
            <div class="aui-list-item-inner">
                <div class="aui-list-item-input">
                    <textarea class="content" style="height: 4rem;" oninput="edited(this);" placeholder="请输入内容"></textarea>
                    <!--<div onclick="openChatBox(this);" style="height: 4rem; overflow:scroll;width:100%;">-->
                        <!--<textarea class="content" style="height: 4rem;" oninput="edited(this);" placeholder="请输入内容"></textarea>-->
                        <!--<div id="message-show-container" class="main-content" style="width:100%; background:red; color: white;"> </div>-->
                    <!--</div>-->
                </div>
            </div>
        </li>
        <li class="aui-list-item">
            <div class="aui-list-item-inner" style="margin-right: 0.75rem; width: auto;">
				<div class="swiper-container">
				    <ul class="photo-list swiper-wrapper" style="overflow-x: scroll;">
					</ul>
				</div>
			</div>
		</li>
	</ul>
</script>
<!-- <div>
    上传进度：<p id="progress"></p>
</div>
<p id="backurl"></p> -->

<script id="tpl-add-photo-btn" type="text/x-dot-template">
	<li class="swiper-slide">
		<div class="btn-add-photo" id="select-photo-btn" tapmode onclick="selectPhoto(this);">
	        <i class="aui-iconfont aui-icon-plus"></i>
		</div>
	</li>
</script>

<script id="tpl-photo-thumb" type="text/x-dot-template">
        {{? !it.duration}}
        	<li class="swiper-slide">
        	    <i class="aui-iconfont aui-icon-close del-photo" tapmode onclick="delPhoto(this);"></i>
        		<div class="photo" tapmode onclick="browsePhotos(this);"  data-type="pic" data-path="{{=it.path}}" data-img-from="{{=it.from}}">
                    <img src="{{=it.thumbPath}}" />
                </div>
        	</li>
        {{??}}
            <li class="swiper-slide">
        	    <i class="aui-iconfont aui-icon-close del-photo" tapmode onclick="delPhoto(this);"></i>
        		<div class="video photo" tapmode onclick="playVideo(this)" data-dur="{{=it.duration}}" data-type="video" data-size="{{=it.size}}" data-path="{{=it.path}}" data-img-from="{{=it.from}}">
                    <div class="play"></div>
                    <img src="" alt=""/>
                    <video class="aui-hide" src="{{=it.path}}" style="width:60px;height:60px;"></video>
                </div>
        	</li>
        {{?}}

</script>

<script type="text/javascript" src="../../../config.js"></script>
<script type="text/javascript" src="../../../global/script/lib/api.js"></script>
<script type="text/javascript" src="../../../global/script/lib/doT.min.js"></script>
<script type="text/javascript" src="../../../global/script/lib/aui-toast.js"></script>
<script type="text/javascript" src="../../../global/script/lib/swiper.min.js"></script>
<script type="text/javascript" src="../../../global/script/lib/zepto.min.js"></script>
<script type="text/javascript" src="../../../global/script/libx/myCompact.js"></script>
<script type="text/javascript" src="../../../global/script/libx/myMediaScanner.js"></script>
<script type="text/javascript" src="../../../global/script/libx/myPic.js"></script>
<script type="text/javascript" src="../../../global/script/mylib.js"></script>
<script type="text/javascript" src="../../../global/script/libx/myChatBox.js"></script>
<script type="text/javascript" src="../../../app.js"></script>
<script type="text/javascript" src="./frm.js"></script>

</html>

<script type="text/javascript" src="../../../global/script/_fakeApi.js"></script>

<script>
	window.selectPhoto = function(el) {
		var one = {
			thumbPath: '../../../global/image/river.jpg'
		};
		addPhotos(el, [one]);
	};

	apiready();

	var selectBtn = $api.byId("select-photo-btn");
	for (var i = 0; i < 10; i++) {
        selectPhoto(selectBtn);
    }
</script>
